package wscomm

type MessageType int64

//枚举类型
const (
	Data MessageType = iota + 1
	Connect
	RemoveConnect
	Error
)

func (m MessageType) String() string {
	switch m {
	case Connect:
		return "CONNECT"
	case Data:
		return "DATA"
	case RemoveConnect:
		return "REMOVE_CONNECT"
	}
	return "UNKNOWN"
}

type Message struct {
	MessageID   string
	AgentID     string
	MessageType MessageType
	Data        []byte
}
type RegHost struct {
	HostID       string `json:"host_id" `
	Sn           string `json:"sn" `
	HostName     string `json:"host_name" `
	Region       string `json:"region" `
	DataCenter   string `json:"data_center" `
	RackPosition string `json:"rack_position" `
	BmcIp        string `json:"bmc_ip" `
	AdminIp      string `json:"admin_ip" `
	BussiIp      string `json:"bussi_ip" `
}
